home *** CD-ROM | disk | FTP | other *** search
/ Keystone Learning XML: Introduction / Keystone Learning Introduction to XML.iso / Sample Files / Chapter 5 / TagError.xml < prev   
Encoding:
Extensible Markup Language  |  1999-12-08  |  1.6 KB  |  64 lines

  1. <?xml version="1.0"?>
  2. <!DOCTYPE employees [
  3.     <!ELEMENT employees ( employee+ )>
  4.  
  5.     <!ELEMENT employee (name, position, address, phone)>
  6.     <!ATTLIST employee id ID #REQUIRED>
  7.  
  8.     <!ELEMENT name (first, last)>
  9.     <!ELEMENT first (#PCDATA)>
  10.     <!ELEMENT last  (#PCDATA)>
  11.  
  12.     <!ELEMENT position (#PCDATA)>
  13.  
  14.     <!ELEMENT address (street?, city?, state?, zip?)>
  15.     <!ELEMENT street (#PCDATA)>
  16.     <!ELEMENT city   (#PCDATA)>
  17.     <!ELEMENT state  (#PCDATA)>
  18.     <!ELEMENT zip    (#PCDATA)>
  19.  
  20.     <!ELEMENT phone (main, office*, fax*, mobile*, home*)>
  21.     <!ELEMENT main   (#PCDATA)>
  22.     <!ELEMENT office (#PCDATA)>
  23.     <!ELEMENT fax    (#PCDATA)>
  24.     <!ELEMENT mobile (#PCDATA)>
  25.     <!ELEMENT home   (#PCDATA)>
  26. ]>
  27.  
  28. <employees>
  29.  
  30.     <employee id="A1234">
  31.         <name>
  32.             <first>John</first>
  33.             <last>Doe</last>
  34.         </name>
  35.         <position>Programmer</position>
  36.         <address>
  37.             <street>123 Main Street</street>
  38.             <city>Anywhere</city>
  39.             <state>CA</state>
  40.             <zip>92000</zip>
  41.         </address>
  42.         <phone>
  43.             <main>(714) 555-1000</main>
  44.             <fax>(714) 555-1001</fax>
  45.         </phone>
  46.     </employee>
  47.  
  48.     <employee id="A2345">
  49.         <name>
  50.             <first>Jane</first>
  51.             <last>Doe</last>
  52.         </name>
  53.         <position>Systems Analyst</position>
  54.         <address>
  55.         </address>
  56.         <phone>
  57.             <main>(714) 555-2000</main>
  58.             <mobile>(949) 555-2200</mobile>
  59.             <home>(949) 555-2220</home>
  60.         </phone>
  61.     </employee>
  62.  
  63. </employees>
  64.